<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
    <title>选择服务</title>
    <meta name="decorator" content="blank"/>
    <%@include file="/WEB-INF/views/include/treeview.jsp" %>
        <script type="text/javascript">
    
        var ids="";
        
        var values="";
        
        // 初始化
        $(document).ready(function(){

        });


        
        //
        function collectClick(){
            

            
            $(".check:checked").each(function(){
                

                
                var str=$(this).val();
                
                var att=str.split("|");
                
                ids+=att[0]+",";
                
                values+=att[1]+",";
                
              
            
            });
            
            ids=ids.substring(0,ids.length-1);
            
            values=values.substring(0,values.length-1);
            
            //alert(ids+"|"+values);
            
        }
        
        function page(n,s){
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
        function clearAssign(){
            
            //alert(111);
            
            $(".check").attr("checked",false);

        };
//      "service_item_id": "卡项所属的服务ID",
//      "service_item_name": "服务名称",
    </script>
</head>
<body>


            
        <form:form id="searchForm" modelAttribute="searchApiRequest" action="${ctx}/consultation/recommend/serviceList" method="post" class="breadcrumb form-search">
        <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
        <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
        <ul class="ul-form">
            <li><label>服务名称：</label>
                <form:input path="itemName" htmlEscape="false" maxlength="20" class="input-medium"/>
            </li>

            <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
            <li class="clearfix"></li>
        </ul>
        </form:form>       
  
        <sys:message content="${message}"/>    
        <table id="contentTable" class="table table-striped table-bordered table-condensed">
	         <thead>
	            <tr>
	                <th>勾选</th>         
	                <th>服务名称</th>           

	            </tr>
	        </thead>
	        <tbody>
	            <c:forEach items="${serviceList}" var="service">
	                <tr>                         
	                 
	                    <td>
	                        <input type="checkbox" path="serviceItemId" value="${service.serviceItemId}|${service.serviceItemName}"  class="check"/>
	                    </td>           
	                    <td>
	                        ${service.serviceItemName}
	                    </td>                       
	                </tr>
	            </c:forEach>
            </tbody>            
        </table>   
        <div class="pagination">${page}</div>        
</body>
</html>
